#include<avr/io.h>

const char inv[8]={0,4,2,6,7,3,5,1};

void Init_mux(void)
{
DDRF|=1<<PF3|1<<PF2|1<<PF1;
};

void set_channel(unsigned char ac_bp,unsigned char channel)
{
  if (ac_bp==1)
  {
   	PORTF|=(inv[(channel-1)]<<1);
	PORTF&=(inv[(channel-1)]<<1);

  }
  if (ac_bp==0)
  {
	 PORTF|=(inv[(8-channel)]<<1);
	 PORTF&=(inv[(8-channel)]<<1);
  }

};
